﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SksApp
{
    public partial class frmDialog : Form
    {
        public frmDialog(MessageStyle style, string baslik, string uyari)
        {
            InitializeComponent();
            lblBaslik.Text = baslik;
            lblContent.Text = uyari;

            switch (style)
            {
                case MessageStyle.Error:
                    imgUyari.Image = Properties.Resources.HATA;
                    break;
                case MessageStyle.Ok:
                    imgUyari.Image = Properties.Resources.OK;
                    break;
                case MessageStyle.Question:
                    imgUyari.Image = Properties.Resources.SORU;
                    break;
                case MessageStyle.Uyari:
                    imgUyari.Image = Properties.Resources.UYARI;
                    break;
                default:
                    break;
            }
        }

        private void frmDialog_Load(object sender, EventArgs e)
        {

        }

        private void btnTamam_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }

        private void btnIptal_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
        }
    }
}
